<?php require_cache('Public/tpl/header.html');?>
		<div class="margincenter location"><a href='./'>ShowMei.org</a> > <a href="index.php?s=/Showmei/Beautyshow/index">BeautyShow</a> > <a href="index.php?s=/Showmei/Beautyshow/index/f/beautyshow/s/<?php echo $s;?>"><?php echo $s;?></a></div>
		<!-- start Beauty Show -->
		<div class="main">
			<div class="block_left">
				<div class="p_list">
					<?php if ($files_arr) {
						foreach ($files_arr as $v){
						?>
					<div class="itm"><a href="index.php?s=/Showmei/Beautyshow/browse/f/beautyshow/s/<?php echo $s;?>/i/<?php echo urlencode($v);?>" target="_blank">
				 	<img title="check big one" src="__PUBLIC__/uploads/beautyshow/<?php echo $s;?>/<?php echo $v;?>" onmouseover="showPic(this.src,this.parentNode,event)"  />
				 	<div><?php echo $s;?></div>
				 	</a>
				 	</div>
						<?php }
					}else if ($cover_pics) { 
						foreach ($cover_pics as $k => $v){ ?>
						<div class="itm"><a href="?s=/Showmei/Beautyshow/index/f/beautyshow/s/<?php echo $k;?>" target="_blank">
				 	<img src="__PUBLIC__/uploads/beautyshow/<?php echo $k;?>/<?php echo $v;?>" />
				 	<div><?php echo $k;?></div>
				 	</a>
				 	</div>
				 	<?php }
					} ?>
				 </div>
			</div>
		</div>
		<div id="Layer1" class="circle_" style="display:none;position:absolute;z-index:1000;overflow:hidden;border:2px solid #7BB443;background:#fff;"><div class="floatleft"><a id="Layer1imga" target="_blank" ><img id="Layer1img" src="" /></a></div><div class="floatright"></div></div>
<script type="text/javascript">
function showPic(s,a,e){  
	oEvent = document.all ? window.event : e ;//区别ie,firefox
	
	var x,y;//无所谓
	var tscrollTop = document.documentElement.scrollTop;
	var tscrollLeft = document.documentElement.scrollLeft;
	if (oEvent.clientX || oEvent.clientY) { 
		if (document.documentElement.scrollTop) {   
			x=oEvent.clientX+document.documentElement.scrollLeft;
			y=oEvent.clientY+document.documentElement.scrollTop;
		} else {   
			x=oEvent.clientX+document.body.scrollLeft;
			y=oEvent.clientY+document.body.scrollTop;
		}
	} 
	document.getElementById("Layer1imga").href=a.href;
	var img = document.getElementById("Layer1img");
	img.src = s;
	img.onload = function(){
		var cw = document.documentElement.clientWidth?document.documentElement.clientWidth: document.body.clientWidth;
		var ch = document.documentElement.clientHeight?document.documentElement.clientHeight: document.body.clientHeight;
		var h = img.height;
		var w = img.width;
		var arrWHs = scaleWH(w,h,600,600); 
	    var arrWH = arrWHs.split('||');
		img.width = parseInt(arrWH[0]);
		img.height = parseInt(arrWH[1]); 
		if( img.width + x > cw || img.height + y > ch) {
			if(img.width <= x){
				x -= img.width;
			} 
			if(img.height <= y){
				y -= img.height;
			}
		}
		document.getElementById("Layer1").style.left = x +"px"; 
		document.getElementById("Layer1").style.top = y +"px"; 
		document.getElementById("Layer1").style.display = "block";
	}
}
function hiddenPic(){
	document.getElementById("Layer1").innerHTML = "";
	document.getElementById("Layer1").style.display = "none"; 
}
function scaleWH($srcW,$srcH,$toW,$toH){
	var $toWH = $toW/$toH; 
	var $srcWH = $srcW/$srcH; 
	
	if ($toWH <= $srcWH)
	{
		if($toW < $srcW)
		{
			$ftoW = $toW;
			$ftoH = $ftoW*($srcH/$srcW);
		}
		else
		{
			$ftoW = $srcW;
			$ftoH = $srcH;
		}
	}
	else
	{	
		if($toH < $srcH)
		{
			$ftoH = $toH;
			$ftoW = $ftoH*($srcW/$srcH);
		}
		else
		{
			$ftoW = $srcW;
			$ftoH = $srcH;
		}
	} 
	return $ftoW +'||'+$ftoH;
}
</script>
<?php require_cache('Public/tpl/footer.html');?>
